package com.olek;

import com.olek.MainFrame.SidePanel;
import com.olek.Model.ModelFragment;

public class View {
	
	private MainFrame mainFrame;
	private Model model;
	private Controller controller;
	
	public View(Model model, Controller controller) {
		this.model = model;
		this.controller = controller;
		mainFrame = new MainFrame(controller);
		SwingConsole.run(mainFrame, 800, 600);
		
		
	}
	
	public void refresh(boolean isLeft) {
		SidePanel panel = mainFrame.getPanel(isLeft);
		ModelFragment fragment = model.getFragment(isLeft);
		panel.refresh(fragment);

	}

}
